package com.yxjx.duoxue.payment.datamodel;

import org.json.JSONException;
import org.json.JSONObject;

import com.yxjx.duoxue.datamodel.DMObject;

public class DMKidInfo extends DMObject {
	
	public String getKidsName() {
		return kidsName;
	}

	public void setKidsName(String kidsName) {
		this.kidsName = kidsName;
	}

	public Integer getKidsSex() {
		return kidsSex;
	}

	public void setKidsSex(Integer kidsSex) {
		this.kidsSex = kidsSex;
	}

	public Integer getKidsBirthYear() {
		return kidsBirthYear;
	}

	public void setKidsBirthYear(Integer kidsBirthYear) {
		this.kidsBirthYear = kidsBirthYear;
	}

	public Integer getKidsBirthMonth() {
		return kidsBirthMonth;
	}

	public void setKidsBirthMonth(Integer kidsBirthMonth) {
		this.kidsBirthMonth = kidsBirthMonth;
	}

	public Integer getKidsBirthDay() {
		return kidsBirthDay;
	}

	public void setKidsBirthDay(Integer kidsBirthDay) {
		this.kidsBirthDay = kidsBirthDay;
	}

	public String getKidsDetail() {
		return kidsDetail;
	}

	public void setKidsDetail(String kidsDetail) {
		this.kidsDetail = kidsDetail;
	}

	public String getCourseType() {
		return courseType;
	}

	public void setCourseType(String courseType) {
		this.courseType = courseType;
	}

	public Long getTime() {
		return time;
	}

	public void setTime(Long time) {
		this.time = time;
	}
	
	// 子女姓名
	private String kidsName;
	// 子女性别1-男2-女
	private Integer kidsSex;
	// 出生年
	private Integer kidsBirthYear;
	// 出生月
	private Integer kidsBirthMonth;
	// 出生日
	private Integer kidsBirthDay;
	// 子女性格特点id逗号分隔字符串"
	private String kidsDetail;
	// 子女感兴趣课程分类id逗号分隔字符串
	private String courseType;
	// 时间戳"
	private Long time;
	
	public JSONObject getJsonObject() {
		JSONObject jo = new JSONObject();
		try {
			jo.put("kidsName", kidsName);
			jo.put("kidsSex", kidsSex);
			jo.put("kidsBirthYear", kidsBirthYear);
			jo.put("kidsBirthMonth", kidsBirthMonth);
			jo.put("kidsBirthDay", kidsBirthDay);
			jo.put("kidsDetail", kidsDetail);
			jo.put("courseType", courseType);
			jo.put("time", time);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return jo;
	}
	
	@Override
	public String toString() {
		return "{\"kidsName\":\"" + kidsName + "\","
				+ "\"kidsSex\":\"" + kidsSex + "\","
				+ "\"kidsBirthYear\":\"" + kidsBirthYear + "\","
				+ "\"kidsBirthMonth\":\"" + kidsBirthMonth + "\","
				+ "\"kidsBirthDay\":\"" + kidsBirthDay + "\","
				+ "\"kidsDetail\":\"" + kidsDetail + "\","
				+ "\"courseType\":\"" + courseType + "\","
				+ "\"time\":\"" + time + "\"}";
	}
}
